<?php
namespace Home\Model;
use Think\Model;
Class ReleaseModel //extends Model
{
    /**
     * 添加单条发布数据
     * @return \Model|Model
     */
    public function add_release_info($res,$condition = '')
    {
        return M("section_release")->where($condition)->add($res);
    }

    /**
     * 查询用户发布数据
     * @param $condition
     * @return mixed
     */
    public function get_release_info($condition = '',$order = "release_id desc")
    {
        return M("section_release")->where($condition)->order($order)->select();
    }


    /**
     * 查询单条发布数据
     * @param $condition
     * @return mixed
     */
    public function get_release_one_info($condition = '')
    {
        return M("section_release")->where($condition)->find();
    }

    /**
     * 删除用户发布数据
     * @param $condition
     * @return mixed
     */
    public function delete_release_info($condition = '',$param)
    {
        return M("section_release")->where($condition)->save($param);
    }


}


?>